import Vue from "vue"
import VueRouter from "vue-router"
Vue.use(VueRouter)
// Vue.use(Vue)


// import Home from "@/views/Home";
const  routers  =[
    {
      path: "/login",
      name: "login",
      component:()=>import("@/views/login")
    },
    {
      path: "/person",
      name: "person",
      component:()=>import("@/views/Person")
    },
    {
        path:'/',
        name:'Menu',
        redirect:'/home',
        component:()=>import("@/views/Menu"),
        children:[
            {
                path:"/home",
                component:()=>import("@/views/home/Home"),
                name:"home"
            },
            {
                path:"/user",
                component:()=>import("@/views/user/User"),
                name:"user"
            },
            {
                path:"/shop",
                component:()=>import("@/views/shop"),
                name:"shop"
            },
            {
                path:"/page1",
                name:"page1",
                label:"每天一笑",
                component:()=>import("@/views/page/page1")
            },
            {
                path:"/page2",
                name:"page2",
                label:"页面2",
               component:()=>import("@/views/page/page2")
            },
        ]
    }
]
const router = new  VueRouter({

    routes:routers,
    mode:'hash',

})

export default router